package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javabean.JPanelImagen;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;

import javax.swing.JPanel;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class vUsuario extends javax.swing.JFrame {
	private JPanelImagen panFondo;
	private JButton btnAceptar;
	private JLabel lblGanar;
	private JTextField txtnombre;
	private JLabel lblmensaje;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public vUsuario() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			//setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				panFondo = new JPanelImagen();
				getContentPane().add(panFondo, BorderLayout.CENTER);
				panFondo.setLayout(null);
				panFondo.setRutaImagen("/imagenes/Cerebro.jpg");
				panFondo.setPreferredSize(new java.awt.Dimension(262, 237));
				panFondo.setForeground(new java.awt.Color(64,0,128));
				{
					btnAceptar = new JButton();
					panFondo.add(btnAceptar);
					btnAceptar.setText("Aceptar");
					btnAceptar.setBounds(101, 193, 91, 29);
					btnAceptar.setFont(new java.awt.Font("Segoe UI",1,12));
					btnAceptar.setForeground(new java.awt.Color(128,64,0));
				}
				{
					lblGanar = new JLabel();
					panFondo.add(lblGanar);
					lblGanar.setText("Has Ganado Incluye ");
					lblGanar.setBounds(17, 47, 117, 24);
					lblGanar.setFont(new java.awt.Font("Segoe UI",1,12));
					lblGanar.setForeground(new java.awt.Color(64,0,128));
				}
				{
					lblmensaje = new JLabel();
					panFondo.add(lblmensaje);
					lblmensaje.setText("Tu Nombre De Usuario!!");
					lblmensaje.setBounds(124, 77, 140, 16);
					lblmensaje.setFont(new java.awt.Font("Segoe UI",1,12));
					lblmensaje.setForeground(new java.awt.Color(64,0,128));
				}
				{
					txtnombre = new JTextField();
					panFondo.add(txtnombre);
					txtnombre.setBounds(67, 158, 159, 23);
				}
			}
			pack();
			this.setSize(292, 266);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
public void agregarListener(ActionListener accion){
	btnAceptar.addActionListener(accion);
}
public String getNombre()
{
	return txtnombre.getText();
}
public void Mensaje(String texto){
	JOptionPane.showMessageDialog(this,texto);
}
}
